home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / filesel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.6 KB  |  142 lines

  1. #include <exec/types.h>
  2. #include <exec/io.h>
  3. #include <exec/memory.h>
  4. #include <dos/dos.h>
  5. #include <dos/dosextens.h>
  6. #include <dos/exall.h>
  7. #include <graphics/gfx.h>
  8. #include <graphics/gfxbase.h>
  9. #include <intuition/intuition.h>
  10. #include <intuition/classes.h>
  11. #include <intuition/gadgetclass.h>
  12. #include <intuition/icclass.h>
  13. #include <libraries/gadtools.h>
  14. #include <workbench/workbench.h>
  15. #include <string.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18.  
  19. #include <proto/exec.h>
  20. #include <proto/dos.h>
  21. #include <proto/graphics.h>
  22. #include <proto/layers.h>
  23. #include <proto/intuition.h>
  24. #include <proto/gadtools.h>
  25. #include <proto/icon.h>
  26. #include <proto/console.h>
  27. #include <proto/utility.h>
  28. #include <clib/macros.h>
  29. #include <clib/alib_protos.h>
  30. #include <mydebug.h>
  31.  
  32. #include "screen.h"
  33. #include "window.h"
  34. #include "gadgetlist.h"
  35. #include "gadgets/string.h"
  36. #include "gadgets/cstring.h"
  37. #include "gadgets/eprop.h"
  38. #include "gadgets/fbutton.h"
  39. #include "slist.h"
  40. #include "locale.h"
  41.  
  42. #define FILE    gfile->curstring
  43. #define DRAWER  gdrawer->curstring
  44. #define COMMENT gcom->curstring
  45.  
  46. #define DISPLAY_FILES   0
  47. #define DISPLAY_DIRS    1
  48. #define MAXLEN          255
  49. #define MAXENTRIES      100
  50.  
  51. static WORD TOT_DISPLAY ;
  52.  
  53. static WORD FONTHEIGHT ;
  54. static WORD LEFTBOX ;
  55. static WORD TOPDBOX ;
  56. static WORD TOPFBOX ;
  57. static WORD WIDTHBOX ;
  58. static WORD HEIGHTBOX ;
  59.  
  60. static WORD LEFTSEL ;
  61. static WORD TOPSEL ;
  62. static WORD WIDTHSEL ;
  63. static WORD HEIGHTSEL ;
  64.  
  65. struct DClick {
  66.     ULONG s;
  67.     ULONG m;
  68. } ;
  69.  
  70. class filesel : public window
  71. {
  72. public:
  73.     void fparent(gadget *g, unsigned long classe, unsigned short code) ;
  74.     void fdrawer(gadget *g, unsigned long classe, unsigned short code) ;
  75.     void fprop(gadget *g, unsigned long classe, unsigned short code) ;
  76.     char title[80] ;
  77.     BOOL clipok ;
  78.     filesel(short l, short t, short w, short h) : window(l, t, w, h) {}
  79.     void open(screen *) ;
  80.     void simpleevent(IntuiMessage *msg) ;
  81.     void handlevkey(USHORT code) ;
  82. };
  83.  
  84. static IntuiMessage     *message;       // the message the IDCMP sends us
  85. static BPTR             clef, oldkey;
  86.  
  87. static UWORD            code;       // IDCMP stuff
  88. static ULONG            classe;
  89.  
  90. static APTR             object;
  91. static List             *RepList;
  92. static Node             *RepNode, *Garage = NULL;
  93. static ULONG            nbfics = 0;
  94. static LONG             topentry = 0;
  95. static char             chemin[MAXLEN];
  96. static char             DTEMP[MAXLEN] = "";
  97. static TextAttr         **Style;
  98. static char             stemp[MAXLEN], stemp2[MAXLEN], tmp[MAXLEN];
  99. static FileInfoBlock    *bloc;
  100. static WORD             indsel, numsel ;
  101. static char             pat[MAXLEN] ;
  102. static char             RexxCmd[MAXLEN] ;
  103. static DClick           declic = {0, 0};
  104. static Region           *clipregion ;
  105. static Rectangle        cliprect ;
  106. static char             comstring[80] = "" ;
  107.  
  108. static LONG             lm ;
  109.  
  110. static char name[MAXLEN];
  111. static BOOL Mode = DISPLAY_FILES;
  112. static BOOL clickon ;
  113.  
  114. static TextAttr ITALIC80 = {
  115.         (STRPTR)"topaz.font",
  116.         TOPAZ_EIGHTY,FSF_ITALIC,0
  117. };
  118.  
  119. static struct TextAttr Plain, Italic ;
  120.  
  121. static BOOL Saver ;
  122. static IntuiText *listetext ;
  123.  
  124. IMPORT ULONG rexxsig ;
  125. IMPORT MsgPort *RexxPort ;
  126.  
  127. static string   *gdrawer ;      // RĂ©pertoire
  128. static string   *gfile ;        // Nom du fichier
  129. static eprop    *gprop ;        // Scroller
  130. static string   *gcom ;         // Commentaire Lecture/Ecriture
  131. static cstring  *cgcom ;        // Commentaire Lecture Seule
  132.  
  133. static UBYTE    fpen ;
  134. static UBYTE    bpen ;
  135.  
  136. IMPORT lstring  ok ;
  137. IMPORT lstring  cancel ;
  138. IMPORT lstring  parent ;
  139. IMPORT lstring  drawer ;
  140. IMPORT lstring  file ;
  141. IMPORT lstring  comment ;
  142.